namespace EYangFrame.DataAccess.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AddMessage : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "SCOTT.EYANG_LINKUSER",
                c => new
                    {
                        ID = c.Guid(nullable: false),
                        Name = c.String(maxLength: 200),
                        User = c.String(maxLength: 40),
                        LinkUsers = c.String(maxLength: 500),
                        CREATETIME = c.DateTime(nullable: false),
                        CREATEUSER = c.String(),
                    })
                .PrimaryKey(t => t.ID);
            
            CreateTable(
                "SCOTT.EYANG_MESSAGE",
                c => new
                    {
                        ID = c.Guid(nullable: false),
                        From = c.String(nullable: false, maxLength: 40),
                        To = c.String(nullable: false, maxLength: 500),
                        MessageContent = c.String(nullable: false, maxLength: 500),
                        MessageData = c.String(maxLength: 1000),
                        DataType = c.String(maxLength: 100),
                        ReadUser = c.String(maxLength: 500),
                        ReadTimes = c.String(),
                        IsSendEmail = c.String(maxLength: 1),
                        CREATETIME = c.DateTime(nullable: false),
                        CREATEUSER = c.String(),
                    })
                .PrimaryKey(t => t.ID);
            
            CreateTable(
                "SCOTT.EYANG_MESSAGEMODEL",
                c => new
                    {
                        ID = c.Guid(nullable: false),
                        User = c.String(maxLength: 40),
                        MessageModelContent = c.String(maxLength: 500),
                        ModelName = c.String(maxLength: 200),
                        CREATETIME = c.DateTime(nullable: false),
                        CREATEUSER = c.String(),
                    })
                .PrimaryKey(t => t.ID);
            
        }
        
        public override void Down()
        {
            DropTable("SCOTT.EYANG_MESSAGEMODEL");
            DropTable("SCOTT.EYANG_MESSAGE");
            DropTable("SCOTT.EYANG_LINKUSER");
        }
    }
}
